const path = require('path')
module.exports = {
  devServer: {
    port: 9999,
    open: true,
    proxy: {
      '/filter': {
        target: 'https://api.it120.cc/filter',
        ws: false,
        changeOrigin: true,
        pathRewrite: { '^/filter': '' }
      }
    }
  },
  lintOnSave: false,
  chainWebpack: (config) => {
    config.resolve.alias
      .set('@', path.join(__dirname, './src'))
      .set('@assets', path.join(__dirname, './src/assets'))
      .set('@views', path.join(__dirname, './src/views'))
      .set('@components', path.join(__dirname, './src/components'))
      .set('@api', path.join(__dirname, './src/api'))
      .set('@utils', path.join(__dirname, './src/utils'))
      .set('@directives', path.join(__dirname, './src/directives'))
      .set('@filters', path.join(__dirname, './src/filters'))
    // set第一个参数：设置的别名，第二个参数：设置的路径
  }

}
